import Vue from 'vue';
import Router from 'vue-router';
import StoreManagement from '../components/SroreManagement.vue';
import Login from '../components/Login.vue';
import Orders from '../components/Order.vue';
import Users from '../components/Users.vue';
import Products from '../components/Products.vue';


Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Login  // 将 Login 设置为默认页面
    },
    {
      path: '/StoreManagement',
      name: 'StoreManagement',
      component: StoreManagement,
      children: [
        {
          path: 'orders',
          name: 'Orders',
          component: Orders
        },
        {
          path: 'users',
          name: 'Users',
          component: Users
        },
        {
          path: 'products',
          name: 'Products',
          component: Products
        }
        
      ]
    }
  ]
});